<?php
/**
 * 报量单模型
 */

namespace app\common\model;

use think\model\concern\SoftDelete;

class Order extends CommonBaseModel {
	use SoftDelete;
	// 自定义选择数据

	protected $name = 'order';
	protected $autoWriteTimestamp = true;

	// 可搜索字段
	public array $searchField = ['code'];

	// 可作为条件的字段
	public array $whereField = ['school_id'];

	// 可作为多选条件的字段
	public array $multiWhereField = [];

	// 可做为时间
	public array $timeField = [];

	/**
	 * 关联
	 */
	public function check() {
		return $this->hasMany(Check::class);
	}/**
	 * 关联
	 */
	public function computeDetail() {
		return $this->hasMany(ComputeDetail::class);
	}/**
	 * 关联
	 */
	public function dose() {
		return $this->hasMany(Dose::class);
	}/**
	 * 关联
	 */
	public function school() {
		return $this->belongsTo(School::class);
	}

}
